from machine import Pin, UART
from machine import Timer
import time
from car import CAR

BLE_MSG = ""
uart = UART(1, baudrate=115200, tx=17, rx=16)
Car = CAR()
while True:
    if (uart.any()):
        speed = uart.readline()
        print('Echo Byte: {}\n'.format(speed))
        speed = speed.decode("utf-8").replace("\\n",'')
        speed = speed.split()
        speed = list(map(int, speed))
        Car.turn(speed)

